package com.alibaba.citrus.ots.price.ability.functions.entity.price;

import com.epoch.app.otspricecenter.sdo.PriceRecordSDO;
import lombok.Data;

/**
 * @author: qiaojiange
 * @create: 2021/09/15
 * @Description 价格记录实体
 */
@Data
public class PriceRecordEntity {

    private PriceRecordSDO priceRecordSDO;

    public static PriceRecordEntity of(PriceRecordSDO priceRecordSDO) {
        PriceRecordEntity entity = new PriceRecordEntity();
        entity.setPriceRecordSDO(priceRecordSDO);
        return entity;
    }

    public Long obtainMoneyAmout() {
        return priceRecordSDO == null ? null : priceRecordSDO.getMoneyAmount();
    }

    public String obtainMoneyPercentage() {
        return priceRecordSDO == null ? null : priceRecordSDO.getMoneyPercentage();
    }

    public String obtainCurrency() {
        return priceRecordSDO == null ? null : priceRecordSDO.getCurrency();

    }

    public String obtainPriceUnit() {
        return priceRecordSDO == null ? null : priceRecordSDO.getPriceUnite();

    }

    public Long obtainItemCount() {
        return priceRecordSDO == null ? null : priceRecordSDO.getItemCount();
    }
}
